package com.jit.app.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatUtils {

    public static String toString(long ms,String pattern){
        SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
        return dateFormat.format(new Date(ms));
    }

    public static long toHours(long ms){
        long now = System.currentTimeMillis();
        long m = now - ms;
        return m % 1000 % 60 % 60;
    }

}
